<template>
  <div>
    <el-table stripe height="90%" :data="classData" style="width: 100%">
        <el-table-column prop="name" label="姓名"> </el-table-column>
        <el-table-column prop="sex" label="性别">
          <template slot-scope="scope">
            <span>{{ scope.row.sex == 1 ? "男" : "女" }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="age" label="年龄"> </el-table-column>
      </el-table>
  </div>
</template>

<script>
import { getClazzs } from '@/api';
export default {
    data() {
        return {
          classData:[],
        };
    },
    mounted(){
      getClazzs().then(res => {
        if(res.code === 200){
          this.classData = res.data;
        }
      })
    }
}
</script>

<style>

</style>